Contents | Index | < Browse | Browse >
LETTERfstreamULETTER
A class for file I/O operations.
Overview
#include <fstream.h>
class fstream : public iostream {
public:
fstream();
fstream(const char *, int);
virtual ~fstream();
void open(const char *, int);
void close();
filebuf *rdbuf();
};
Portability
AT&T Release 2 streams library
Description
The fstream class provides an input/output stream for files. It uses the
filebuf as streambuf.
Constructors
fstream::fstream();
Initializes an object without opening a file.
fstream::fstream(const char *, int);
Initializes an object and opens the specified file.
Deconstructors
fstream::~fstream();
Closes the file if it is open.
Methods
void open(const char *, int);
Opens the file with the specified name and mode.
void close();
Closes the file.
filebuf *rdbuf();
Returns a pointer to the file puffer used.
See also
iostream , ifstream , ofstream , filebuf